package com.aqs;

import java.util.concurrent.locks.ReentrantLock;

public class ReentrantLockDemo {

	public static void main(String[] args) {
		ReentrantLock reentrantLock = new ReentrantLock(true);

		reentrantLock.lock();

		reentrantLock.tryLock();

		reentrantLock.unlock();

		synchronized (ReentrantLockDemo.class) {
			System.out.println(hello());
		}
	}

	public static String hello() {
		return "hello";
	}
}
